{% extends 'base.html.twig' %}
 
{% block stylesheets %}
<style>
    #body {
        background: transparent url('{{ imgsrc("images/gamebg.jpg") }}?v=2') no-repeat top center;
        background-size: cover;
    }
    .yuanbao { display: block; margin: 0 auto; padding-top: 30%; width: 217px; }
    .title { font-size: 21px; margin: 0 auto; padding-top: 24px; text-align: center; width: 250px; }
    .btn-wrapper { margin: 30px auto 0; width: 203px; }
    .btn-wrapper .btn { display: block; float: left; width: 101px; }
    .btn-wrapper .btn img { width: 100%; }
    .drawnotice { width: 100%; margin: 10px auto; }
    .btnshare { display: block; width: 101px; margin: 0 auto;}
    .btnshare img { width: 100%; }
    .linkrule { display: block; margin: 0 auto;  width: 90px; padding-top: 20px; }
    .linkrule img { width: 100%; }
    .overlay .share { width: 100%; }
    @media all and (max-height: 420px) {
        .title { padding: 10px 0; }
        .btn-wrapper { margin: 5px auto 0; }
        .btnshare { width: 81px; }
        .yuanbao { padding-top: 40px; }
    }
</style>
{% endblock %}

{% block body %}
    <img class='yuanbao' src='{{imgsrc("images/yuanbao.png")}}?v=2'>
    {% if score < 10000 %}
    <div class='title hitext'>才{{ score }}个金币，<br/>下次努力向钱冲噢！</div>
    {% elseif score < 100000 %}
    <div class='title hitext'>手气好得这么清新脱俗！<br/>接到了{{ score }}个金币哟！</div>
    {% elseif score < 500000 %}
    <div class='title hitext'>人品爆棚，{{ score }}个金币照亮我的钱途！ </div>   
    {% elseif score >= 500000 %}
    <div class='title hitext'>小宇宙爆发啦，<br/>接到{{ score }}个金币！</div>  
    {% endif %}
    <div class='btn-wrapper clearfix'>
        <a class='btn' href='{{ urlFor("game")}}'><img src='{{ imgsrc("images/btnagain.png") }}'></a>
        <a class='btn' href='{{ urlFor("draw")}}'><img src='{{ imgsrc("images/jinku.png") }}'></a>
    </div>
    <img class='drawnotice' src='{{ imgsrc("images/notice4.png")}}?v=4'>
{#    <a class='btnshare' href='#'><img src='{{ imgsrc("images/btnshare.png")}}'></a>#}
{#    <a class='linkrule' href='{{ urlFor("rule") }}'><img src='{{ imgsrc("images/linkrule.png")}}?v=4'></a>#}
    <div class='overlay'>
        <img class='share' src='{{ imgsrc("images/share.png") }}?v=2'>
    </div>
{% endblock %}
    
{% block javascripts %}
{#{{ js('js/velocity.ui.min.js') }}#}
<script>
$(function(){
    $('#body').css('height', h + 'px');
    
    $('.btnshare').click( function(e){
        e.preventDefault();
        $('.overlay').velocity('fadeIn');
        $('.overlay').velocity('fadeOut', { delay: 2000 });
    });
 });
 
{#{% if score < 100000 %}
shareContent = '{{ score }}个金币照亮我的钱途，快来测测你的吧！';   
{% elseif score < 500000 %}
shareContent = '我抢到{{ score }}个金币，羊年肯定棒！快来看看你的钱途！';       
{% elseif score >= 500000 %}
shareContent = '{{ app.user.nick }}靠{{ score }}个金币脱贫致富，你也来测测钱途吧！';       
{% endif %}#}

</script>
{% endblock %}